<template>
<div>

  <div :key="index" v-for="(item,index) in menu">
      <el-menu-item v-if="item.children==''" :index="item.path">
        <template>


          <i :class="['fzicon',item.icon]"></i>
          <span>{{item.title}}</span>
        </template>
      </el-menu-item>
    <el-submenu :index="item.path" v-else>
      <template slot="title">
        <i :class="['fzicon',item.icon]"></i>
        <span>{{item.title}}</span>
      </template>
      <menu-list :menu="item.children"></menu-list>
    </el-submenu>





  </div>

</div>
</template>

<script>
export default {
  name: "MenuList",
  props:['menu']
,
  created() {
    console.log(111111);
    console.log(this.menu);
  }
}
</script>

<style scoped>

</style>
